#ifndef UDPCLIENT_H
#define UDPCLIENT_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <arpa/inet.h>

#include <epicsThread.h>
#include <epicsEvent.h>
#include "epicsRingBytes.h"
#include "EventData.hpp"
#include "DataRingConsumeThread.hpp"



class UdpClient {
public:
	TcpSocketDataInfo *pTcpSocketDataInfo;
	int socket_id;
	bool do_recv;
    UdpClient(TcpSocketDataInfo *);
	
    void createSocket();
	void start();
    void close();
    int receive(unsigned char *, int);
private:
    
	struct addrinfo *pAddrinfo;
	epicsThread *pDataRingConsumeThread;
	

};

#endif